<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/aui.css">
    <link rel="stylesheet" href="css/style.css">
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/init.js"></script>
    <title>充值中心</title>
</head>
<body>
<header>
    <a href="index.html" class="f1 head-back"></a>
    <div class="f8">充值中心</div>
    <div class="f1"></div>
</header>
<section class="bg-gray">
    <div class="pad-3">
        <div class="flex flex-stretch space-btw">
            <a href="recharge.html" class="pad-1-2 bg-white border-radius-1 border-gray"><b>+</b>充值申请</a>
            <p id="mz_apply" class="pad-1-2 bg-white border-radius-1 border-gray">申请盟主</p>
            <ul class="bg-white border-gray border-radius-1 flex pad-l-r-2">
                <a href="javascript:location.reload()" class="f1 border-r-gray">
                    <img class="" src="img/icon1.png" alt="" width="20">
                </a>
                <!--<li class="f1">
                    <img class="col-5 auto" src="img/icon2.png" alt="" >
                </li>-->
            </ul>
        </div>
        <!--<div class="right mar-t-3">
            <input class="col-5 bg-white pad-1-2 border-radius-1 border-gray" type="search" placeholder="搜索">
        </div>-->

        <ul class="awardlist border-gray mar-t-3">
            <!--<li class="border-b-gray">
                <div>
                    <p>序号</p>
                    <p>2019-07-22</p>
                </div>
                <div>
                    <p>会员编号</p>
                    <p>10.22</p>
                </div>
                <div>
                    <p>充值类型</p>
                    <p>2.11</p>
                </div>
                <div>
                    <p>数量</p>
                    <p>0.00</p>
                </div>
                <div>
                    <p>申请时间</p>
                    <p class="color-green">0.00</p>
                </div>
                <div>
                    <p>审核时间</p>
                    <p>0.00</p>
                </div>
                <div>
                    <p>状态</p>
                    <p>
                        <span class="pad-l-r-1 color-white font25 bg-yellow">未确认</span>
                    </p>
                </div>
                <div>
                    <p>备注</p>
                    <p>
                        <span class="pad-l-r-1 color-white font25 bg-red">撤销</span>
                    </p>
                </div>
            </li>-->

        </ul>
    </div>
</section>

<script src="js/foot.js"></script>
<script>
    // 充值列表
    var data;
    new AjaxRequest({
        type: 'post',
        data: data,
        dataType: 'json',
        url: hostUrl + 'index/Recharge/detailed',
        callback: res => {
            if(res.status == 1){
                list = '';
                for (var i=0;i<res.data.length;i++){
                    var temp = res.data[i].coin_type==1? "以太坊（ETH）" : "以太经典（ETC）";
                    list += '<li class="border-b-gray"><div><p>序号</p><p>'+(i+1)+'</p></div><div><p>会员编号</p><p>'+(res.data[i].id_num?res.data[i].id_num:'0')+'</p></div><div><p>充值类型</p><p>'+temp+'</p></div><div><p>数量</p><p>'+(res.data[i].recmoney?res.data[i].recmoney:'0')+'</p></div><div><p>申请时间</p><p class="color-green">'+(res.data[i].recstart?res.data[i].recstart:'0000-00-00')+'</p></div><div><p>审核时间</p><p>'+(res.data[i].recendtime?res.data[i].recendtime:'0000-00-00')+'</p></div><div><p>状态</p><p>';

                    if(res.data[i].recexamine == 1){
                        list += '<span class="pad-l-r-1 color-white font25 bg-blue">充值中</span>';
                    }
                    if(res.data[i].recexamine == 2){
                        list += '<span class="pad-l-r-1 color-white font25 bg-red">充值失败</span>';
                    }
                    if(res.data[i].recexamine == 3){
                        list += '<span class="pad-l-r-1 color-white font25 bg-yellow">充值成功</span>';
                    }

                    list += '</p></div><div><p>备注</p><p><span class="pad-l-r-1 font25 block line-h-1">'+(res.data[i].id_num+'+'+res.data[i].jy_wallet_add)+'</span></div><div><p>说明</p><p><span class="pad-l-r-1 font25 ">'+(res.data[i].falimessages?res.data[i].falimessages:'无')+'</span></div></li>';
                }
                $(".awardlist").html(list);

            }
        }
    });

    $("#mz_apply").click(function () {
        var data;
        new AjaxRequest({
            type: 'post',
            dataType: 'json',
            url: hostUrl + 'index/Chiefapply/extract',
            data: data,
            callback: res => {
                toast(res.msg);
                if(res.status == 1){

                }
            }
        });
    })

</script>
</body>
</html>